﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
    <link href="../../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" /> 
    <link href="../../../lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" /> 
    <script src="../../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
     <script src="../../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerButton.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerRadio.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
    <script src="../../../lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>  
    <script src="../../../lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>  
    <script src="../../grid/CustomersData.js"></script>
    <script type="text/javascript"> 
        var groupicon = "../../../lib/ligerUI/skins/icons/communication.gif";
        $(function ()
        { 
            //创建表单结构 
            $("#form2").ligerForm({
                inputWidth: 170, labelWidth: 90, space: 40,
                fields: [
                { name: "ProductID", type: "hidden" },
                { display: "产品名称", name: "ProductName", newline: true, type: "text" , group: "基础信息", groupicon: groupicon},
                {
                    display: "顾客", name: "CustomerID", textField: "CustomerName",
                    newline: false, type: "combobox", editor: {
                        selectBoxWidth: 600,
                        selectBoxHeight: 300,
                        textField: 'CustomerID',
                        valeuField: 'CustomerID',
                        condition: {
                            prefixID : 'condition_',
                            fields: [
                                { label: '顾客', name: 'CustomerID', type: 'text' }
                            ]
                        },
                        grid: {
                            columns: [
                { display: '主键', name: 'CustomerID', align: 'left', width: 140, minWidth: 33 },
                { display: '公司名', name: 'CompanyName', minWidth: 120 },
                { display: '联系名', name: 'ContactName', minWidth: 140 },
                { display: '城市', name: 'City' }
                            ], data: CustomersData, isScroll: false, sortName: 'CustomerID',
                            width: 680
                        }
                    }},
                { display: "类别 ", name: "CategoryID", newline: true, type: "select", comboboxName: "CategoryName", options: { valueFieldID: "CategoryID" }, width: 240 },
                { display: "日期 ", name: "AddTime", newline: true, type: "date"  },
                { display: "折扣", name: "QuantityPerUnit", newline: false, type: "number" },
                { display: "单价", name: "UnitPrice", newline: true,  type: "number" },
                { display: "库存量", name: "UnitsInStock", newline: true, type: "digits", group: "库存", groupicon: groupicon },
                { display: "订购量", name: "UnitsOnOrder", newline: false, type: "digits" },
                { display: "备注", name: "Remark", newline: true, type: "text" ,width:470 }
                ]
            }); 
        });  
    </script> 

</head>
<body style="padding:10px"> 
  <div id="form2"></div> 
</html>